import React from './node_modules/react';
import { BrowserRouter, Link, Route } from './node_modules/react-router-dom';
import Home from './home';
import About from './about';
const Index = () => {
  return (
    <div>
      <BrowserRouter>
        <nav>
          <Link to={{
            pathname:'/home',
            search:'?name=小明&age=16&job=学生'
          }}>首页</Link>
          <Link to="/about">关于</Link>
        </nav>
        <main>
          <Route path="/home" component={Home} />
          <Route path="/about" component={About} />
        </main>
      </BrowserRouter>
    </div>
  );
};

export default Index;
